<template>
  <div class="home-container">
    <el-card class="welcome-card">
      <template #header>
        <div class="card-header">
          <span>欢迎来到 Summer Web</span>
        </div>
      </template>
      <div class="card-content">
        <p>这是一个基于 Vue 3 + Element Plus + Vue Router 4 + Pinia + Axios + Vite 的项目模板</p>
        <el-button type="primary" @click="handleAbout">了解更多</el-button>
      </div>
    </el-card>
  </div>
</template>

<script setup>
import { useRouter } from 'vue-router'

const router = useRouter()

const handleAbout = () => {
  router.push('/about')
}
</script>

<style scoped>
.home-container {
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.welcome-card {
  max-width: 600px;
  margin: 50px auto;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-content {
  text-align: center;
  padding: 20px;
}

.card-content p {
  margin-bottom: 20px;
  color: #606266;
}
</style>